package com.link2room.quintesson.controller.task;

import com.link2room.common.dto.result.base.BaseResultDto;
import com.link2room.quintesson.dto.param.manager.TaobaoXrateManagerParamDto;
import com.link2room.quintesson.facade.ITaobaoXrateFacadeService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by sss on 2016/9/13.
 */
@RestController
@RequestMapping("/Task/TaobaoXrates")
public class TaobaoXrateTaskController {
    @Resource
    private ITaobaoXrateFacadeService taobaoXrateFacadeService;

    @RequestMapping("/Increment")
    public BaseResultDto pricePools(
            @RequestParam(value = "lhotelCode" ,required = false) String lhotelCode
    ) throws Exception {
        TaobaoXrateManagerParamDto taobaoXrateManagerParamDto =new TaobaoXrateManagerParamDto();
        taobaoXrateManagerParamDto.setLhotelCode(lhotelCode);
        taobaoXrateFacadeService.upTaobaoXrateIncrementList(taobaoXrateManagerParamDto);
        BaseResultDto l2rRs=new BaseResultDto();
        l2rRs.setResultCode(0);
        return l2rRs;
    }
}
